<template>
    <div class="views-yingyuanxinxi-detail">
        <div>
            <el-card class="box-card">
                <template #header>
                    <div class="clearfix">
                        <span class="title"> 影院详情 </span>
                    </div>
                </template>

                <el-descriptions class="margin-top" :column="3" border>
                    <el-descriptions-item label="影院编号"> {{ map.yingyuanbianhao }} </el-descriptions-item>
                    <el-descriptions-item label="影院名称"> {{ map.yingyuanmingcheng }} </el-descriptions-item>
                    <el-descriptions-item label="影院图片"> <e-img :src="map.yingyuantupian" class="detail-image" style="max-width: 120px" /> </el-descriptions-item>
                    <el-descriptions-item label="负责人"> {{ map.fuzeren }} </el-descriptions-item>
                    <el-descriptions-item label="联系电话"> {{ map.lianxidianhua }} </el-descriptions-item>
                    <el-descriptions-item label="影院地址"> {{ map.yingyuandizhi }} </el-descriptions-item>
                    <el-descriptions-item label="添加人"> {{ map.tianjiaren }} </el-descriptions-item>
                </el-descriptions>

                <el-descriptions direction="vertical" class="margin-top" :column="1" border>
                    <el-descriptions-item label="影院描述"> <div v-html="map.yingyuanmiaoshu"></div> </el-descriptions-item>
                </el-descriptions>

                <div class="no-print">
                    <el-button @click="$router.go(-1)">返回</el-button>
                    <el-button @click="$print">打印</el-button>
                </div>
            </el-card>
        </div>
    </div>
</template>

<script setup>
    import http from "@/utils/ajax/http";
    import DB from "@/utils/db";

    import { ref, reactive, watch } from "vue";
    import { useRoute } from "vue-router";
    import { session } from "@/utils/utils";
    import { extend } from "@/utils/extend";
    import { useYingyuanxinxiFindById, canYingyuanxinxiFindById } from "@/module";

    const route = useRoute();

    // 获取详情页面的一行数据,当url参数id变更时，自动
    const map = useYingyuanxinxiFindById(route.query.id);
    // 当url参数id变更时，自动更新map中的数据
    watch(
        () => route.query.id,
        (id) => {
            canYingyuanxinxiFindById(id).then((res) => {
                extend(map, res);
            });
        }
    );
    // end 获取详情页面的一行数据
</script>

<style scoped lang="scss">
    .views-yingyuanxinxi-detail {
    }
</style>
